%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Iteration 9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Iteration 9: Fraud Detection (UC19 UC20)}

In the ninth iteration we will handle the remaining fraud detection use cases. We will not decompose an existing component, but add a component to support bank card fraud detection. The use cases relevant to this are:
\begin{itemize}
 \item UC19: Initiate fraud detection
 \item UC20: Send results of fraud detection
\end{itemize}

In this iteration we will thus provide a way for SAB to interact with a third party Fraud Detection Company and to handle flagged bank cards.

These drivers can be summarized in the following requirements:
\begin{itemize}
 \item SAB wants to minimize and prevent fraud with bank cards.
 \item SAB uses a service from a third party Fraud Detection Company.
 \item SAB regularly selects random accounts which are linked to a bank card and sends their transaction histories to the Fraud Detection Company. 
 \item The Fraud Detection Company returns the results and SAB processes them. 
 \item In case a card is flagged SAB will block it (using the bank card company) and notify the customer and their primary bank clerk.
\end{itemize}




% Insert figure
\begin{figure}[!ht]
    \centering
        \includegraphics[width=0.7\textwidth]{images/It9_UC19_UC20_componentdiag.png}
    \caption{Component diagram after iteration 9.}
    \label{fig:It9_UC19_UC20_componentdiag}
\end{figure}


To satisfy these drivers we introduce a \emph{Fraud Detection Module} [figure \ref{fig:It9_UC19_UC20_componentdiag}]. The component has access to bank accounts and the related transaction histories through the \emph{Customer Information} facade. It randomly picks a few accounts and sends the required information to the Fraud Detection Company.

When the \emph{Fraud Detection Module} receives a positive reply from the Fraud Detection Company, it sends out a notification to both the customer and their primary bank clerk using the \emph{Send Notification} facade. Additionally, it notifies the bank card company that the compromised bank cards need to be blocked using the \emph{Bank Card Module}. 


Requirements can be divided over relevant components as follows:
\begin{itemize}

	\item \emph{Fraud Detection Module}
	\begin{itemize}
 		\item UC19: Initiate fraud detection
 		\item UC20: Send results of fraud detection
	\end{itemize}

\end{itemize}
